DevJourney

Python/RegEx/Extract first 2 letters of every word in a string/Extract first 2 letters of every word in a string.py

import re

s = str(input("Enter statement: "))
res = re.findall(r'\b\w{2}',s)
print(res)
View on GitHub